package com.mjk.common.ai.entity;

import com.mjk.common.ai.enums.UserStatusEnum;
import com.mjk.common.base.model.BaseEntity;
import com.mjk.common.core.jdbc.annotation.ArcSharding;
import com.mjk.common.core.jdbc.annotation.Filed;

import com.mjk.common.core.jdbc.annotation.Id;
import com.mjk.common.core.jdbc.service.idgenerator.IdGenerateType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * User对象
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ArcSharding(dataSource = "pg", table = "adi_user")
public class User extends BaseEntity {

    @Id(type = IdGenerateType.AUTO_UUID)
    private Long id;

    @Filed(cloum = "create_time")
    private LocalDateTime createTime;

    @Filed(cloum = "update_time")
    private LocalDateTime updateTime;

    @Filed(cloum = "is_deleted", comment = "是否删除（0：未删除，1：已删除）")
    private Boolean isDeleted;

    @Filed(cloum = "name", comment = "用户名称")
    private String name;

    @Filed(cloum = "email", comment = "email")
    private String email;

    @Filed(cloum = "password", comment = "密码")
    private String password;

    @Filed(cloum = "uuid", comment = "uuid")
    private String uuid;

    @Filed(cloum = "understand_context_msg_pair_num", comment = "上下文理解中需要携带的消息对数量（提示词及回复）")
    private Integer understandContextMsgPairNum;

    @Filed(cloum = "quota_by_token_daily", comment = "token quota in one day")
    private Integer quotaByTokenDaily;

    @Filed(cloum = "quota_by_token_monthly", comment = "token quota in one month")
    private Integer quotaByTokenMonthly;

    @Filed(cloum = "quota_by_request_daily", comment = "request quota in one day")
    private Integer quotaByRequestDaily;

    @Filed(cloum = "quota_by_request_monthly", comment = "request quota in one month")
    private Integer quotaByRequestMonthly;

    @Filed(cloum = "quota_by_image_daily")
    private Integer quotaByImageDaily;

    @Filed(cloum = "quota_by_image_monthly")
    private Integer quotaByImageMonthly;

    @Filed(cloum = "user_status")
    private UserStatusEnum userStatus;

    @Filed(cloum = "active_time")
    private LocalDateTime activeTime;

    @Filed(cloum = "is_admin", comment = "是否管理员（0：否，1：是）")
    private Boolean isAdmin;
}
